﻿{namespace n=GeorgRinger\News\ViewHelpers}

<f:layout name="Detail.html" />
<f:section name="content">
	<f:if condition="{newsItem}">
		<f:then>
			<f:if condition="{newsItem.alternativeTitle}">
					<f:then>
						<n:format.nothing>
							<n:titleTag>
								{newsItem.alternativeTitle}
							</n:titleTag>
						</n:format.nothing>
					</f:then>
					<f:else>
						<n:format.nothing>
							<n:titleTag>
								{newsItem.title}
							</n:titleTag>
						</n:format.nothing>
					</f:else>
				</f:if>
			<div class="c-title c-font-bold c-font-uppercase">
				{newsItem.title}
			</div>
			
			<div class="c-panel c-margin-b-30 clearfix">
				<!-- Baidu Button BEGIN -->
				<div class="pull-left">
					<div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a><a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a></div>
					<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
				</div>
				<!-- Baidu Button END -->
				<div class="pull-right">
					<div class="c-author">
						<f:translate key="LLL:typo3conf/ext/website/Resources/Plugin/news/Language/locallang.xml:hitsum" />
						<span class="c-font-uppercase">{newsItem.hit} 次 &nbsp;&nbsp;</span>
					</div>
					<div class="c-author">
						<a href="javascript:;"><f:translate key="LLL:typo3conf/ext/website/Resources/Plugin/news/Language/locallang.xml:author" />
							<span class="c-font-uppercase">{newsItem.author}</span>
						</a>
					</div>
					<div class="c-date">
						<f:translate key="LLL:typo3conf/ext/website/Resources/Plugin/news/Language/locallang.xml:releaseDate" />
						<span class="c-font-uppercase"><f:format.date format="{f:translate(key:'dateFormat')}">{newsItem.datetime}</f:format.date></span>
					</div>
				</div>
			</div>
			<div class="c-desc">
				<!-- <f:if condition="{newsItem.teaser}">
					<f:format.raw>{newsItem.teaser}</f:format.raw><br/>
				</f:if> -->
				<f:if condition='{settings.templateLayout}==3'>
					<style>
						.c-desc embed,iframe,video{
							height:500px;
							width:100%;
						}
						.new-content p{
							text-align: center;
						}
					</style>
				</f:if>
				<f:format.raw>{newsItem.bodytext}</f:format.raw>
				
				<script>
					var len = $("video").length;
					if(len>0){
						for(var i=0;i<len;i++){
							$("video").eq(i).removeAttr("preload");
						}
					}
				</script>
			</div>


		<f:if condition="{settings.backPid}">	
				<f:link.page pageUid="{settings.backPid}" class="btn btn-info">
					返回
				</f:link.page>	
		</f:if>

		</f:then>
		<f:else>

		</f:else>
	</f:if>
			<!-- 赏一个 -->
			<script type="text/javascript">
				(function($){
					$(function(){
						var paymentContent = $('.tx-payment').clone();
						$('.tx-payment').remove();
					});
				})(jQuery);
			</script>
</f:section>